<script>
import {storage} from '@/utils';
export default {
  data() {
    return {
      token: ""
    }
  },
  methods: {
    showSuccessMessage(message) {
      this.$message({
        message: message,
        type: "success"
      });
    },
    showErrorMessage(message) {
			this.$message.error(message);
    },
    getUser() {
      
    },
    getApproveHistory(id) {
      return new Promise((resolve, reject) => {
        let params = {
          id: id
        };
        this.$store.dispatch('common/queryApproveHistory', params).then(res => {
          resolve(res);
        })
      })
    },
    queryApproveByBiz(id, type) {
      return new Promise((resolve, reject) => {
        let params = {
          bizId: id,
          bizType: type
        };
        this.$store.dispatch('common/queryApproveByBiz', params).then(res => {
          resolve(res);
        })
      })
    },
    queryApproveById(id) {
      return new Promise((resolve, reject) => {
        let params = {
          id: id
        };
        this.$store.dispatch('common/queryApproveById', params).then(res => {
          resolve(res);
        })
      }) 
    }
  },
  mounted() {
    this.token = storage.get('token');
  }
}; 
</script>